import VueRouter from 'vue-router'
import Vue from 'vue'

Vue.use(VueRouter)

// 路由引进
import Home from '../view/Home/Home'
import className from '../view/className/className'
import Mine from '../view/Mine/Mine'
import shopCar from '../view/shopCar/shopCar'
import Interview from '../view/Interview/Interview'
import Productshow from '../view/productshow/productshow'
import search from '../view/search/search'

// 二级路由引进
import Recommend from '../view/Home/HomeComponents/Recommend'
import Phone from '../view/Home/HomeComponents/Phone'
import Intelligent from '../view/Home/HomeComponents/Intelligent'
import Tv from '../view/Home/HomeComponents/Tv'
import Computer from '../view/Home/HomeComponents/Computer'
import Screen from '../view/Home/HomeComponents/Screen'
import Life from '../view/Home/HomeComponents/Life'
import Box from '../view/Home/HomeComponents/Box'
import Art from '../view/Home/HomeComponents/Art'


var routes = [
	{path:"/home" ,name:"homeLink" , component:Home,
		children:[
			{path:"/",name:"recommendLink",component:Recommend},
			{path:"/phone",name:"phoneLink",component:Phone},
			{path:"/intelligent",name:"intelligentLink",component:Intelligent},
			{path:"/tv",name:"tvLink",component:Tv},
			{path:"/computer",name:"computerLink",component:Computer},
			{path:"/screen",name:"screenLink",component:Screen},
			{path:"/life",name:"lifeLink",component:Life},
			{path:"/box",name:"boxLink",component:Box},
			{path:"/art",name:"artLink",component:Art},
			{path:"" , redirect : Recommend}
		]
	},
	{path:"/className" ,name:"classNameLink" , component:className},
	{path:"/Mine" ,name:"MineLink" , component:Mine},
	{path:"/shopCar" ,name:"shopCarLink" , component:shopCar},
	{path:"/interview" , component : Interview},
	{path:"/productshow" , component : Productshow},
	{path:"/search" , component : search},
	{path:"",redirect:"/home"}
]

export default new VueRouter({
	routes
})
